#!/usr/bin/env python
# -*- conding: utf-8 -*-

"""
@Time     : 2024/9/3 7:27
@Author   : liujingmao
@File     : 1.Document与TextLoader.py
"""

from langchain_community.document_loaders import TextLoader

# 1. 构建加载器
loader = TextLoader("./sale.txt", encoding="utf-8")

# 2. 加载数据
document = loader.load()

print(document)
print(len(document))
print(document[0].metadata)
